package com.example.demo2.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.demo2.util.TransferPage;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.stage.Stage;

/**
 * @description This class is for user interaction between users and boardingpass print page
 * @version 2.0
 */

public class PrintController {
    @FXML
    private Button backButton;

    @FXML
    private Label Flight;

    @FXML
    private Label Date;

    @FXML
    private Label theClass;

    @FXML
    private Label Number;

    @FXML
    private Label Name;

    @FXML
    private Label Des;

    @FXML
    private Label Seat;

    @FXML
    private Label BoardingTime;

    @FXML
    private Label Gate;

    @FXML
    public void backController(javafx.event.ActionEvent event) {
        Stage primaryStage = (Stage) backButton.getScene().getWindow();
        primaryStage.hide();
        TransferPage.transfer("food", "Food and Seat Selector",600,1000);
    }

//    @FXML
//    public void setFlight(JSONObject object) {
//        Flight.setText(object.getString("Flight"));
//    }
//
//    @FXML
//    public void setDate(JSONObject object) {
//        Date.setText(object.getString("Date"));
//    }
//
//    @FXML
//    public void setTheClass(JSONObject object) {
//        theClass.setText(object.getString("theClass"));
//    }
//
//    @FXML
//    public void setNumber(JSONObject object) {
//        Number.setText(object.getString("BookingNum"));
//    }
//
//    @FXML
//    public void setTheName(JSONObject object) {
//        Name.setText(object.getString("FirstName") + object.getString("SurName"));
//    }
//
//    @FXML
//    public void setDes(JSONObject object) {
//        Des.setText(object.getString("Destination"));
//    }
//
//    @FXML
//    public void setSeat(JSONObject object) {
//        Seat.setText(object.getString("seatNum"));
//    }
//
//    @FXML
//    public void setBoardingTime(JSONObject object) {
//        BoardingTime.setText(object.getString("BoardingTime"));
//    }
//
//    @FXML
//    public void setGate(JSONObject object) {
//        Gate.setText(object.getString("Gate"));
//    }
}
